from models.base import BaseModel, db


class DictionaryItem(BaseModel):
    __tablename__ = 'dictionary_item'
    __table_args__ = {'comment': '字典项表模型'}

    dic_code = db.Column(db.String(255), primary_key=True, nullable=False, comment='字典编码')
    code = db.Column(db.String(255), primary_key=True, nullable=False, comment='字典项编码')
    name = db.Column(db.String(255), nullable=False, comment='名称')
    order_index = db.Column(db.INTEGER, nullable=False, comment='排序号')
    can_remove = db.Column(db.Boolean, nullable=False, comment='是否可以删除')
    parent_code = db.Column(db.String(255), nullable=False, comment='父级字典项编码')
